package router

import (
	"article-hub/article-hub/handerls"
	"github.com/gin-gonic/gin"
	"net/http"
)

func Init() *gin.Engine {

	r := gin.Default()

	r.GET("/", func(c *gin.Context) {
		c.String(http.StatusOK, "hello World!")
	})

	r.POST("/add", handerls.Add)

	r.POST("/upload", handerls.Upload)

	r.GET("/del", handerls.Del)

	r.GET("/list", handerls.List)

	return r

}
